const { SyncWaterfallHook } = require('tapable');
//类的构造函数可以接收一个可选 参数，参数是一个参数 名的字符串数组
let hook = new SyncWaterfallHook(['name','age']);
//tap = document.addEventListener('click'); on
hook.tap("1", (name, age) => {
    console.log('1',name, age);
    return "result1"
});
hook.tap("2", (name, age) => {
    console.log('2',name, age);
});
hook.tap("3", (name, age) => {
    console.log('3',name, age);
});
hook.call('zhufeng',12);